<?php

/**
 * Yii view FBLikeButton
 *
 * @author luubk
 * @since Dec 2, 2012 - 11:47:40 AM
 */
class FBLikeButton extends CWidget
{

    // Facebook Like Button Attributes
    public $href         = 'http://www.facebook.com/platform'; //The URL of the Page
    public $height       = '60'; //The height of the plugin in pixels. The default height varies based on number of faces to display, and whether the stream is displayed. With the stream displayed, and 10 faces the default height is 556px. With no faces, and no stream the default height is 63px.
    public $appId        = '306171316071773'; //The apps ID
    public $show_faces   = 'true'; //specifies whether or not to display profile photos in the plugin. Default value: true.
    public $share        = 'true'; //share button
    public $border_color = 'none'; //the border color of the plugin.
    //
    // Widget Attributes

    public function init()
    {
        
    }

    public function run()
    {
        $html = "<iframe src='//www.facebook.com/plugins/like.php?href={$this->href}';
            width&amp;layout=standard&amp;action=like&amp;show_faces={$this->show_faces}&amp;share={$this->share}&amp;
            height={$this->height}&amp;appId={$this->appId}' scrolling='no' frameborder='0' style='border:{$this->border_color};
                overflow:hidden; height:{$this->height}px;' allowTransparency='true'></iframe>";
        echo $html;
    }

}
